#include "CommandLeft.h"
#include "MaMap.h"
#include "Model.h"
 void CommandLeft::execute(){
	 int x = block->getX();
	 int y = block->getY();
	 Model::getInstance()->getMaMap()->moveBlock(block, x-1, y,false);
	 x--;
	 block->setPosition(x,y);
	 block->pushMovement(Vec3(x,y,0));
 }
 
 void CommandLeft::undo(){
	 int x = block->getX();
	 int y = block->getY();
	 Model::getInstance()->getMaMap()->moveBlock(block, x+1, y,true);
	 x++;
	 block->setPosition(x,y);
	 block->pushMovement(Vec3(x,y,0));
 }